import { lazy } from "react";
import { RouteProps } from "react-router";

const Home = lazy(() => import("@/pages/home"));
const NotFound = lazy(() => import("@/pages/not-found"));
const PracticeMode = lazy(() => import("@/pages/practice-mode"));
const DesignerMode = lazy(() => import("@/pages/designer-mode"));
const PassMode = lazy(() => import("@/pages/pass-mode"));
const PkMode = lazy(() => import("@/pages/pk-mode"));
const Level = lazy(() => import("@/pages/level"));

// 自定义路由数据
interface IRouteProps extends RouteProps {
  routes?: IRouteProps[];
}
const routes: IRouteProps[] = [
  { path: "/", element: Home },
  { path: "/practice", element: PracticeMode },
  { path: "/designer", element: DesignerMode },
  { path: "/pk", element: PkMode },
  { path: "/pass", element: PassMode },
  { path: "/level", element: Level },
  { path: "/*", element: NotFound },
];

export default routes;
